<include file="../Public/header" />
<!-- TinyMCE -->
<script type="text/javascript" src="../Public/js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="../Public/js/tiny_mce/plugins/tinybrowser/tb_tinymce.js.php"></script>
<script type="text/javascript">
	tinyMCE.init({
                height:"400",
		mode : "exact",
		elements : "article_sort_content",
		language : "zh",
		theme : "advanced",
		file_browser_callback : "tinyBrowser",
		plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",

		// Theme options
		theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
		theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
		theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,

		// Example word content CSS (should be your site CSS) this one removes paragraph margins
		content_css : "css/word.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
</script>
<!-- /TinyMCE -->
<link href="../Public/js/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../Public/js/uploadify/swfobject.js"></script>
<script type="text/javascript" src="../Public/js/uploadify/jquery.uploadify.js"></script>
<script type="text/javascript">
$(function() {	
        $('#file_upload').uploadify({
        'uploader'  : '../Public/js/uploadify/uploadify.php?img_path=articlesort',
        'swf'       : '../Public/js/uploadify/uploadify.swf',
        'cancelImage' : '../Public/js/uploadify/uploadify-cancel.png',
        'auto'      : true,

        'buttonText': '点击上传',

        'onUploadSuccess'  : function(file,data,response) {   $("#file_image").val(data) }  
        });
        
});
</script>
<!----------------------------------------------------------------------------------->
<style>
    .articlesort{ font-size: 12px}
    .articlesort .name{ width: 200px; text-align: right; padding: 0 10px 0 0; height: 40px}
    .articlesort .submit{ text-align: right; background: none}
</style>
<form method="post" action="{:U('doinsert')}">
    
    <table class="articlesort">
        <tr>
            <td class="name">父分类</td>
            <td>
                <select name="article_sort_parent_id">
                    <option value="0">一级分类</option>
                    <foreach item="vo" name="articlesort">
                        <option value="{$vo.article_sort_id}" <if condition="$vo.article_sort_id eq $sid">selected</if> ><if condition="$vo.level gt 1"><for start="1" end="$vo.level">&nbsp;&nbsp;</for></if>|-{$vo.article_sort_name}</option>
                    </foreach>
                </select>
            </td>
            
        </tr>
        <tr>
            <td class="name">分类名称</td>
            <td><input type="text" name="article_sort_name" value="" /></td>
        </tr>
        <tr>
            <td class="name">栏目封面</td>
            <td>
                <!-- 上传控件开始 -->
                        
                        图片地址：<input type="text" id="file_image" name="article_sort_img" />
                        <input id="file_upload" name="file_upload" type="file" />
                        
                        
                    <!-- 上传控件结束 -->
            </td>
        </tr>
        <tr>
            <td class="name">栏目类型</td>
            <td>
                <input type="radio" value="0" name="place" checked="checked" />栏目
                <input type="radio" value="1" name="place" />单页
            </td>
        </tr>
        <tr>
            <td class="name">栏目状态</td>
            <td>
                <input type="radio" value="1" name="article_sort_status" checked="checked" />开启
                <input type="radio" value="0" name="article_sort_status" />关闭
            </td>
        </tr>
        <tr>
            <td class="name">栏目排序</td>
            <td><input type="text" name="article_sort_ordering" value="0" size="4" /></td>
        </tr>
        <tr>
            <td class="name">外链地址</td>
            <td><input type="text" name="article_sort_url" value=""  /></td>
        </tr>
        <tr>
            <td class="name">网页模板（单页且url为空时生效）</td>
            <td><input type="text" name="article_sort_theme" value=""  /></td>
        </tr>
        <tr>
            <td class="name">网页内容（单页且url为空时生效）</td>
            <td><textarea id="article_sort_content" name="article_sort_content"></textarea></td>
        </tr>
        <tr>
            <td class="submit" colspan="2"><input type="submit" value="确认添加" /></td>
        </tr>
    </table>
    
    
    
</form>
                        
			 
			 
<!-----------------------------------------------------------------------------------> 
<include file="../Public/footer" />